﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MyKeywordFilter
{
    public partial class MyKeywordFilterPlugin_1_Form : Form
    {
        public MyKeywordFilterPlugin_1_Form()
        {
            InitializeComponent();
        }

        private UInt32 minimumNumOfAppearance = 1;
        public UInt32 MinimumNumOfAppearance
        {
            get
            {
                return minimumNumOfAppearance;
            }
        }

        private void button_Set_Click(object sender, EventArgs e)
        {            
            try
            {
                minimumNumOfAppearance = UInt32.Parse(this.textBox_MinNumOfA.Text);

                this.DialogResult = System.Windows.Forms.DialogResult.OK;
                this.Close();
            }
            catch
            {
                MessageBox.Show("You have to enter the right number!");
            }
        }

        private void button_Cancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.Close();
        }
    }
}
